﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Service.BAL;

namespace Service.DAL
{
    public class LoaiSanPham_DAL
    {
        public static List<LoaiSanPham_BAL> GetAll()
        {
            List<LoaiSanPham_BAL> result = new List<LoaiSanPham_BAL>();
            try
            {
                var loaiSP = from lsp in Common_DAL.storeData.LoaiSanPhams
                             select new LoaiSanPham_BAL()
                             {
                                 MaLoai = lsp.MaLoai.Trim(),
                                 TenLoai = lsp.TenLoai.Trim()
                             };
                result = loaiSP.ToList<LoaiSanPham_BAL>();
            }
            catch
            {

            }
            return result;
        }
    }
}
